﻿using System.IO;
using System.Text;

using NUnit.Framework;

namespace System.Lua.Tests
{
    [TestFixture]
    public class LuaWriteAssignmentTest : LuaWriterTest
    {
        [Test(Description = "Writes a Lua start assignment.")]
        public void WriteStartAssignmentTest()
        {
            const string variableName = "message";

            string result = GetLuaWriterResult(luaWriter => luaWriter.WriteStartAssignment(variableName));

            Assert.AreEqual("message = ", result);

        }

        [Test(Description = "Writes the end of a Lua assignment.")]
        public void WriteEndAssignmentTest()
        {
            string result = GetLuaWriterResult(luaWriter => luaWriter.WriteEndAssignment());

            Assert.AreEqual(Environment.NewLine, result);
        }
    }
}
